import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/map'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue')
  },
  {
    path: '/map',
    name: 'map',
    component: () => import('../views/map.vue' as unknown as string)
  },
  {
    path: '/frame',
    name: 'frame',
    component: () => import('../views/leafer/frame.vue' as unknown as string)
  },
  {
    path: '/ellipse',
    name: 'ellipse',
    component: () => import('../views/leafer/ellipse.vue' as unknown as string)
  },
  {
    path:'/line',
    name:'line',
    component: () => import('../views/leafer/line.vue' as unknown as string)
  },
  {
    path:'/polygon',
    name:'polygon ',
    component: () => import('../views/leafer/polygon.vue' as unknown as string)
  },
  {
    path:'/star',
    name:'star ',
    component: () => import('../views/leafer/star.vue' as unknown as string)
  },
  {
    path:'/path',
    name:'path ',
    component: () => import('../views/leafer/path.vue' as unknown as string)
  },
  {
    path:'/leafer',
    name:'leafer ',
    component: () => import('../views/leafer/index.vue' as unknown as string)
  },
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})
export default router 